<%-- 
    Document   : index
    Created on : 06 Apr 11, 14:02:11
    Author     : user
--%>
<%
    if (session.getAttribute("token")!=null) {
        response.sendRedirect("chat.jsp");
    }
%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <%@include file="head.jsp" %>
        <script type="text/javascript" src="scripts/index.js"></script>
        <script type="text/javascript">
            var isloginformhidden = true;
            function toggleLoginForm() {
                if (isloginformhidden) {
                    show('loginformid');
                    isloginformhidden = false;
                    $('logintoggler').style.backgroundColor = "#2A8B23";
                    $('logintogglertext').style.color = "#FFFFFF";
                } else {
                    hide('loginformid');
                    isloginformhidden = true;
                    $('logintogglertext').style.color = "#2A8B23";
                    $('logintoggler').style.backgroundColor = "#FFFFFF";
                }
            }
        </script>
    </head>
    <body>
        <!--div class="loginformcloser" id="loginformcloser" onclick="toggleLoginForm()">
            &nbsp;
        </div-->
        <div class="header">
            <img class="headerlogo" alt="terserah logo" src="designs/logo_75.png" />
            <div class="headerlinks" id="logintoggler">
                <a href="javascript:toggleLoginForm();" id="logintogglertext" class="aheaderlinks">
                    LOGIN
                </a>
                <div class="loginform" id="loginformid">
                    <form id="loginform" action="javascript:doLogin();" method="post">
                        <div class="loginformfield">
                            Username
                        </div>
                        <input id="usernamelogininput" type="text" class="loginforminputtext" name="username" autofocus="autofocus" />
                        <div class="loginformfield">
                            Password
                        </div>
                        <input id="passwordlogininput" type="password" class="loginforminputtext" name="password" />
                        
                        <img alt="register button" class="registerbutton" onclick="doLogin();" src="designs/loginbutton.png" />
                        <div class="loadingatloginform" id="loadingatloginform">
                            &nbsp;
                        </div>
                    </form>
                </div>
            </div>
            <span class="haveanaccount">
                Sudah daftar?
            </span>
        </div>
        <div class="mainindex">
            <div class="mainindexwrapper">
                <div class="mainindexpersuasion">
                    <div class="mainindexpersuasionbig">Ngomong sesukamu!</div>
                    <div class="mainindexpersuasionsub">
                        Terserah&#174; adalah cara terbaik untuk berkomunikasi dengan siapapun.
                        Baik teman, saudara, bahkan orang yang tidak Anda kenal.
                        Semuanya menyenangkan dengan Terserah&#174;!
                    </div>
                    <div class="">
                        <img id="bigbutton" onclick="document.location='signup.jsp'" onmouseover="this.setAttribute('src', 'designs/big_button_hover.png');" onmouseout="this.setAttribute('src', 'designs/big_button.png');" class="bigbutton" src="designs/big_button.png" />
                    </div>
                </div>
                <div class="ghufron">
                    <img alt="si ghufron" src="designs/ghufron.png" onclick="document.location='signup.jsp'" />
                </div>
            </div>
        </div>
        <%@include file="footer.jsp" %>
    </body>
</html>
